package com.github.cyf.domain.po;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

import com.github.cyf.config.mp.AbstractBaseDO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 角色信息表
 * </p>
 *
 * @author chenyifan
 * @since 2024-10-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sys_role")
@ApiModel(value="Role对象", description="角色信息表")
public class Role extends AbstractBaseDO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "角色ID")
    @TableId("id")
    private Long id;

    @ApiModelProperty(value = "角色名称（英）")
    @TableField("role_name")
    @NotBlank(message = "角色名称不能为空")
    private String roleName;

    @ApiModelProperty(value = "角色代码")
    @TableField("role_code")
    @NotBlank(message = "角色代码不能为空")
    private String roleCode;

    @ApiModelProperty(value = "描述")
    @TableField("description")
    @NotBlank(message = "描述不能为空")
    private String description;

    @ApiModelProperty(value = "是否可用 0：禁用 1：正常（默认）")
    @TableField("enable")
    @NotNull(message = "是否可用不能为空")
    private Integer enable;

    @ApiModelProperty(value = "默认标记 1：默认角色 0：其他")
    @TableField("default_flag")
    private Integer defaultFlag;

}
